package com.lsh.oms.core.enums;

/**
 * 订单操作类型
 *
 * @author huangdong
 * @date 16/8/8
 */
public enum OrderOperateType implements AbstractEnum<Integer> {
    /**
     *
     */
    ORDER_NEW("订单创建", 11),

    ORDER_PAY("订单在线支付", 12),

    ORDER_AUDIT("订单审核", 15),

    ORDER_COMMITTED_TO_OFC("订单提交OFC", 21),

    ORDER_COMMITTED_TO_WMS("订单提交DC", 22),

    ORDER_SORTING("订单分拣", 31),

    ORDER_DELIVERY("订单发货", 32),

    ORDER_ARRIVED("订单送达", 91),

    ORDER_FINISH("订单完成", 93),

    ORDER_CANCEL_BY_CUSTOM_SERVICE("客服取消订单", 94),

    ORDER_CANCEL_BY_CUSTOMER("用户取消订单", 95),

    ORDER_STATUS_ROLLBACK_2_DELIVERED("订单状态回滚至`已发货`", 96),

    DELIVER_NEW("发货单创建", 97),

    SIGN_NEW("签收单创建", 98),

    RETURN_NEW("返仓单创建", 98),

    ORDER_CANCEL_BY_SYSTEM("系统取消订单", 100);

    private final Integer value;

    private final String desc;

    OrderOperateType(String desc, Integer value) {
        this.value = value;
        this.desc = desc;
    }

    @Override
    public Integer getValue() {
        return value;
    }

    @Override
    public String getDesc() {
        return desc;
    }

    public static OrderOperateType get(OrderStatus orderStatus) {
        switch (orderStatus) {
            case ORDER_COMMITED_OFC:
                return OrderOperateType.ORDER_COMMITTED_TO_OFC;
            default:
                return null;
        }
    }
}
